x86,hvm: clean up vpt's period_cycles field
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 28 Jul 2009 15:40:34 +0000 (16:40 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 28 Jul 2009 15:40:34 +0000 (16:40 +0100)
In struct periodic_time, pt->period_cycles is not cpu cycles since c/s
17716 and its value is always the same as pt->period.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
xen/arch/x86/hvm/vpt.c
xen/include/asm-x86/hvm/vpt.h

index a949d918ba00653514ba551fe32d70724360a7a9..c4e47e25cbd15eb9f62ed943e3942e3158347f98 100644 (file)
@@ -230,9 +230,9 @@ void pt_update_irq(struct vcpu *v)
     list_for_each_entry ( pt, head, list )
     {
         if ( !pt_irq_masked(pt) && pt->pending_intr_nr &&
-             ((pt->last_plt_gtime + pt->period_cycles) < max_lag) )
+             ((pt->last_plt_gtime + pt->period) < max_lag) )
         {
-            max_lag = pt->last_plt_gtime + pt->period_cycles;
+            max_lag = pt->last_plt_gtime + pt->period;
             earliest_pt = pt;
         }
     }
@@ -309,7 +309,7 @@ void pt_intr_post(struct vcpu *v, struct hvm_intack intack)
         }
         else
         {
-            pt->last_plt_gtime += pt->period_cycles;
+            pt->last_plt_gtime += pt->period;
             pt->pending_intr_nr--;
         }
     }
@@ -385,7 +385,6 @@ void create_periodic_time(
     pt->vcpu = v;
     pt->last_plt_gtime = hvm_get_guest_time(pt->vcpu);
     pt->irq = irq;
-    pt->period_cycles = (u64)period;
     pt->one_shot = !period;
     pt->scheduled = NOW() + delta;
 
index 2d572d5376d781d1a204765563383fd0d010c9d9..47397e23c8176fb215182e77a78c8e729f65a3a2 100644 (file)
@@ -51,7 +51,6 @@ struct periodic_time {
     struct vcpu *vcpu;          /* vcpu timer interrupt delivers to */
     u32 pending_intr_nr;        /* pending timer interrupts */
     u64 period;                 /* frequency in ns */
-    u64 period_cycles;          /* frequency in cpu cycles */
     s_time_t scheduled;         /* scheduled timer interrupt */
     u64 last_plt_gtime;         /* platform time when last IRQ is injected */
     struct timer timer;         /* ac_timer */